home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 February
/
Macworld (1998-02).dmg
/
Inside Macworld
/
Alphamania 2 & Effector Sets
/
AlphaMania 2
/
methods and modes.dir
/
00018_Script_18
< prev
next >
Wrap
Text File
|
1997-12-19
|
1KB
|
49 lines
on Init
global kCandyHeartSprite, kCandyStartPoint
set kCandyHeartSprite = 15
set the drawmethod of member "candyheart" = #normal
set kCandyStartPoint = point(the locH of sprite kCandyHeartSprite,¨
the locV of sprite kCandyHeartSprite)
UpdateOutput("normal")
end
on VerifyEffect fxSym
set fxList = GetListOfAllEffects(member "candyheart")
return(GetPos(fxList, fxSym))
end
on UpdateOutput fName
set the fontStyle of member "output" = "plain"
put field fName into field "output"
set the fontStyle of member "output" = "plain"
end
on CenterSprite
global kCandyStartPoint, kCandyHeartSprite
set the locH of sprite kCandyHeartsprite = the locH of kCandyStartPoint
set the locV of sprite kCandyHeartSprite = the locV of kCandyStartPoint
updateStage
end
on StylizeOutput
set hit1 = "the sourceMember"
set hit2 = "the sourcePosition"
ScanAndBold("output", hit1)
ScanAndBold("output", hit2)
end
on ScanAndBold fName, hit
-- will boldface the first occurrence of hit in field
if field fName contains hit then
set whereStart = offset(hit, field fName)
if whereStart then
set the fontStyle of char whereStart to whereStart + length(hit) ¨
of field fName = "bold"
end if
end if
end